package com.woniu.microworkorderserver.feignone;

import com.woniu.microcommonsserver.param.ResponseMsg;
import com.woniu.microworkorderserver.feign.UserServerFeign;
import feign.hystrix.FallbackFactory;

public class MicroProjectServerFallbackFactory  implements FallbackFactory<BuildServerFeign> {


    @Override
    public BuildServerFeign create(Throwable throwable) {
        System.out.println("进入熔断");
        return new BuildServerFeign() {
            @Override
            public ResponseMsg findAll() {
                return ResponseMsg.builder().code(200).msg("获取用户数据已达熔断").build();
            }
        };
    }
}
